package com.hrp.controller;

import com.hrp.service.WangjqoTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/8/1 0001.
 */
@Controller
public class HelloWorldController {

    @RequestMapping("/hello")
    @ResponseBody
    public String helloWorld() {
        return "hello word";
    }


    @Autowired
    private WangjqoTestService wangjqoTestService;



    @RequestMapping("/getWangjqoTest2")
    @ResponseBody
    public Map<String, Object> getWangjqoTest2(HttpServletRequest request, HttpServletResponse response) throws Exception {
        Map<String, Object> wangjqoTest = wangjqoTestService.getMyMap1(1);
        return wangjqoTest;
    }

    @RequestMapping("/getWangjqoTest3")
    @ResponseBody
    public Map<String, Object> getWangjqoTest3(HttpServletRequest request, HttpServletResponse response) throws Exception {
        Map<String, Object> wangjqoTest = wangjqoTestService.getMyMap2(2);
        return wangjqoTest;
    }


//    @RequestMapping("/login")
//    public String login() throws Exception {
//        return "login";
//    }

//    @RequestMapping("/index")
//    public String index() throws Exception {
//        return "index";
//    }



}
